﻿using MetroDataApi.Models;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;

namespace MetroDataApi.Controllers.Management
{
    public class AutoSurveyStationsController : ApiController
    {
        // GET api/autosurveystations
        public string Get()
        {
            using (var db = new AutoSurveyDataDataContext())
            {
                var list = from s in db.stations
                           where s.type == "dist"
                           select s;
                return JsonConvert.SerializeObject(list.ToList());
            }
        }

        // GET api/autosurveystations/5
        public string Get(int id)
        {
            return "value";
        }

        // POST api/autosurveystations
        public void Post([FromBody]string value)
        {

        }

        // PUT api/autosurveystations/5
        public void Put(int id, [FromBody]string value)
        {
        }

        // DELETE api/autosurveystations/5
        public void Delete(int id)
        {
        }
    }
}
